package com.xjggb.day03单例;

public class VideoPlayer {
//   1 私有化构造方法
    private VideoPlayer(){

    }
//    2用成员变量存储一个对象
//    懒汉式特点就是拖延症晚期，不到最后一刻都不初始化
    private  static  VideoPlayer videoPlayer=null;
    public  static VideoPlayer getInstance() {
        if (videoPlayer==null){
          videoPlayer = new VideoPlayer();
        }
        return videoPlayer;
    }
}
